package com.xiaomaoguai.springmvc.controller;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonView;

/**
 * @Description :
 * @FileName: User.java
 * @Author :WeiHui.Zhang
 * @Data : 2015年10月28日 上午10:49:56
 * @Version:V1.00
 */
public class User implements Serializable {

	private static final long serialVersionUID = 1L;

	public static interface OnlyIdView {
	}

	public static interface OnlyNameView {
	}

	public static interface AllView extends OnlyIdView, OnlyNameView {
	}

	@JsonView(OnlyIdView.class)
	private Long id;

	@JsonView(OnlyNameView.class)
	private String name;

	public User() {
		super();
	}

	public User(Long id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", name=" + name + "]";
	}

}
